<template>
    <component :is="layout">
      <router-view />
    </component>
</template>
<script>
import { computed, reactive } from "vue";
import { useRouter } from "vue-router";
import DefaultLayout from "./layout/Default.vue";
export default {
  name: "About",
  components: {
    DefaultLayout,
  },
  setup() {
    const router = useRouter();

    const state = reactive({
      layout: computed(() => {
        return router?.meta?.layout || DefaultLayout;
      }),
    });
    return state;
  },
};
</script>
<style lang="scss">
@import url("./assets/css/common.scss");
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  position: relative;
  height: 100%;
  width: 100%;
}

#nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
